<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
    <link rel="stylesheet" href="../css/login.css">
    <script src="../js/app.js"></script>
    <script type="text/javascript">
        function check() {
            var username = login_form.username.value
            var password = login_form.password.value
            if (username == "" || password == "") {
                alert('用户名或密码不能为空！');
                return false;
            }
            if (username == "admin" && password == "123456")
                // alert('登录成功！')
                return true;
            else
                return false;
        }
    </script>
</head>
<body>
    <div class = "box">
        <h2>用户登录</h2>
        <form action="/whopxx_war_exploded/LoginServlet" method="post" name="login_form" onsubmit="return check()">
            <div class="input-box">
                <label for="username">账号: </label>
                <input type="text" name="username">
            </div>
            <div class="input-box">
                <label for="password">密码: </label>
                <input type="password" name="password">
            </div>
            <div class="btn-box">
                <div>
                    <button type="submit">登录</button>
                    <button type="reset">重置</button>
                </div>
                <br/>
                <a href="./register.html">注册新账号</a>
            </div>
        </form>
    </div>
</body>
</html>